<?
	require_once('cURL.php');
	$city = isset($_REQUEST['city']) ? $_REQUEST['city'] : 'New Paltz';
	$curl = new mycurl("http://www.worldweatheronline.com/feed/weather.ashx?q=$city&format=json&num_of_days=2&key=59ac6b61bc163931101811");	
	$curl->createCurl();
	$json = json_decode($curl);	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled Document</title>
    </head>
    
    <body>
    	<form>
        	<label>Which City?</label>
            <input type="text" name="city" />
            <input type="submit" />
        </form>
    	Current Temp: 
        <?= $json->current_condition[0]->temp_F ?>
    </body>
</html>